package com.lhkj.ct.meta.modules.scheduling.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.lhkj.ct.meta.modules.scheduling.model.entity.TblScheMouldTime;
import com.lhkj.ct.meta.modules.scheduling.mapper.ScheMouldTimeMapper;
import com.lhkj.ct.meta.modules.scheduling.service.ScheMouldTimeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 排班模板详情 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2023-10-29
 */
@Service
public class ScheMouldTimeServiceImpl extends ServiceImpl<ScheMouldTimeMapper, TblScheMouldTime> implements ScheMouldTimeService {


    @Override
    public List<TblScheMouldTime> selectAllByMouldId(String mouldId) {
        return getBaseMapper().selectList(
                new LambdaQueryWrapper<TblScheMouldTime>()
                        .eq(TblScheMouldTime::getMouldId, mouldId)
        );
    }

    @Override
    public void deleteByMouldId(String mouldId) {
         getBaseMapper().delete(
                new LambdaQueryWrapper<TblScheMouldTime>()
                        .eq(TblScheMouldTime::getMouldId, mouldId)
        );
    }
}
